| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | var GedcomX = require('../'), |
||
| 13 | var Gender = function(json){ |
||
| 14 | |||
| 15 | // Protect against forgetting the new keyword when calling the constructor |
||
| 16 | if(!(this instanceof Gender)){ |
||
| 17 | return new Gender(json); |
||
| 18 | } |
||
| 19 | |||
| 20 | // If the given object is already an instance then just return it. DON'T copy it. |
||
| 21 | if(Gender.isInstance(json)){ |
||
| 22 | return json; |
||
| 23 | } |
||
| 24 | |||
| 25 | this.init(json); |
||
|
|
|||
| 26 | }; |
||
| 27 | |||
| 89 | module.exports = Gender; |